import React, { useEffect, useState, useRef } from "react";
import { backgroundObj, setSessionItem } from '@/utils/utils';
import { View, Button } from '@tarojs/components'
import Router from '@/utils/router';
import { Space, PopUp } from '@/components/UiComponents'
import "./index.scss";
export default (props) => {
  const { visible = {}, onClose, onShare, hpFlag = '0' } = props;
  const { show = false, } = visible
  return (
    <PopUp
      position={hpFlag === '0' ? 'bottom' : 'right'}
      onClose={() => onClose()}
      visible={show}>
      <View className={hpFlag === '1' ? 'toolPop_box toolPop_box_hp' : 'toolPop_box'}>
        <View className="toolPop_title">更多</View>
        <View className="toolPop_pop_box">
          <View className="toolPop_pop_info" onClick={() => onShare()}>
            <View className="toolPop_pop_info_icon1"></View>
            <View className="toolPop_pop_info_desc">分享</View>
          </View>
          <View className="toolPop_pop_info" onClick={() => Router('prizeList')}>
            <View className="toolPop_pop_info_icon2"></View>
            <View className="toolPop_pop_info_desc">我的抽奖</View>
          </View>
        </View>
      </View>
    </PopUp>
  )
};
